This lecture is mainly based the following textbooks:
Study review and practice: I strongly recommend using Prof. Henrique Castro (FGV-EAESP) materials. Below you can find the links to the corresponding exercises related to this lecture:
\(\rightarrow\) For coding replications, whenever applicable, please follow this page or hover on the specific slides with coding chunks
Previously, we looked at returns from individual assets, but investors are always looking for ways to invest in multiple assets at the same time. What if you hold a portfolio of \(n\) assets?
Let’s keep it simple for now. Suppose you have a two-stock portfolio of assets that hipotetically consists of:
If your portfolio is 40% Amazon and 60% Ferrari, then the return of your portfolio, \(R_p\) is:
\[\small R_p= \sum_{i=1}^{2}\big(x_i\times R_i\big)=(0.4 \times 10\%) +(0.6 \times 15\%) = 13\%\]
\(\rightarrow\) In other words, the return of a portfolio is the weighted average of the individual asset returns!
Important
The weights are selected by the investors and may change over time if the prices change (unless the investor actively rebalances it to match the same proportion by buying/selling). Without trading, the weights increase for those stocks whose returns exceed the portfolio’s return.
To see that, assume that your initial holdings are $100,000:
Your holdings are now worth \(\small 44,000 + 69,000= 113,000\), which yields the 13% return, but now the weights from each stock are different:
As we now have a portfolio of two different assets, what should be the volatility? Recall that:
As we’ll see in the next slides, to compute the standard deviation of a portfolio, we cannot rely on the weighted average anymore!
In order to see that, let’s look at the historical prices from both stocks and compare:
In what follows, we’ll see how these dynamics shed light on the covariance of the portfolio
Intuitively, the returns from both stocks do not move in lockstep: whenever Ferrari prices goes down, Amazon prices move in a different fashion
In fact, the correlation between the returns of these stocks is around 0.39. In other words, these assets do not move in the same direction all the time!
Definition
Theorem I: the variance of the sum of two random variables equals the sum of the variances of those random variables, plus two times their covariance:
\[ \sigma^2(A+B) = \sigma^2_A + \sigma^2_B + 2\times Cov(A,B) \]
Theorem II: The variance scales upon multiplication with a constant:
\[ \sigma^2(\beta \times A ) = \beta^2\times \sigma^2_A \]
Let’s now apply this to understand our portfolio’s volatility using daily data. Define:
Using the definitions highlighted before, that the variance of our portfolio returns, \(R_p\), is:
\[ \small \sigma^2(R_p)=\sigma^2(w_1\times R_1+w_2\times R_2)=w_1^2\times \sigma^2_1 + w_2^2 \times \sigma^2_2 + 2\times w_1\times w_2\times \sigma_{1,2} \]
\[ \small \sigma^2(R_p)=w_1^2\times \sigma^2_1 + w_2^2 \times \sigma^2_1 + 2\times w_1\times w_2\times \underbrace{Cov(R_1,R_2)}_{\sigma_1 \times \sigma_2 \times Corr_{12}}\\ \small = \underbrace{w_1^2\times \sigma^2_1}_{1} + \underbrace{w_2^2 \times \sigma^2_1}_{2} + \underbrace{2\times w_1\times w_2\times \sigma_1 \times \sigma_2 \times Corr_{12}}_{3} \]
Recall that we cannot rely on expectations to future outcomes and/or probabilities to calculate the expected returns of the portfolio and its volatility
Because of that, as we did before, we replace the expectation estimator, \(E(\cdot)\), with our sample analogue, which is the sample average, and it is always backward-looking:
To facilitate the notation, we’ll always refer to it using a bar: \(\overline{R}\). For example the covariance between the returns from stocks \(i\) and \(j\) is:
\[Cov(R_i,R_j) = \frac{\sum_{1}^{T}(R_i-\overline{R_i} ) \times (R_j-\overline{R_j})}{T-1}\]
\[ \small \sigma^2_p= w_1^2\times \sigma^2_1 + w_2^2 \times \sigma^2_1 + 2\times w_1\times w_2\times \sigma_1 \times \sigma_2 \times Corr_{12}\\ \small \underbrace{\small 0.4^2\times 0.3290^2+0.6^2\times 0.2124^2}_{I} + \underbrace{2\times 0.4\times0.6\times 0.3290\times 0.2124\times 0.3886}_{II} = 0.04659402 \]
\[ \small \sigma^2_p= w_1^2\times \sigma^2_1 + w_2^2 \times \sigma^2_1 + 2\times w_1\times w_2\times \sigma_1 \times \sigma_2 \times Corr_{12}\\ \small \underbrace{\small 0.4^2\times 0.3290^2+0.6^2\times 0.2124^2}_{I} + \underbrace{2\times 0.4\times0.6\times 0.3290\times 0.2124\times 0.3886}_{II} = 0.04659402 \]
As you now see, the return of the portfolio is equal to the weighted average of the individual returns…
…However, the volatility of is much lower than the volatility of the two individual stocks, as the assets are offseting each other and making the return “smoother”!
How much risk is eliminated when creating a portfolio? It depends on the degree to which the stocks face common risks and their prices move together (in mathematical terms, this will be captured by the correlation parameter, \(\small Corr_{12}\)!
What if we added a third asset to our portfolio? Let’s say that you’re really into discretionary goods and decide to place a bet on Victoria’s Secret (ticker: VSCO), which had 30% of return in the previous last
You decided to keep the weight on Amazon and split Ferrari and Victoria’s Secret evenly, with 30% each
How does that play a role in your portfolio? As before, your portfolio Return is simply a weighted average of the individual returns:
\[ R_{p}=\sum_{i=1}^{3}w_i\times R_i = \underbrace{(0.4 \times 10\%)}_{\text{Amazon}} +\underbrace{(0.3 \times 15\%)}_{\text{Ferrari}}+ \underbrace{(0.3 \times 25\%)}_{\text{VSCO}}\approx 16\% \]
Adding VSCO to the portfolio severely hit the overall return, \(\small R_p\)
VSCO was also very volatile: its standard deviation was twice as high as Amazon. However, the portfolio volatility is substantially lower
One way to understand this is to look at the correlation matrix between the assets
How can we extend your variance calculation for three assets?
The general formulation of the variance formula shows us that:
\[ \small Var(X)=Var(A+B+C) = E[((A+B+C)-E(A+B+C))]^2 =\\ \small E[(\underbrace{[A-E(A)]}_{\text{First Term}}+[\underbrace{B-E(B)}_{\text{Second Term}}]+[\underbrace{C-E(C)}_{\text{Third Term}}])^2] \\ \]
\[ \small (A+B+C)^2= A^2+B^2+C^2 + 2AB + 2AC +2BC \]
\[ \small \sigma^2_p= \underbrace{w_1^2\times \sigma^2_1}_{I} + \underbrace{w_2^2 \times \sigma^2_1}_{II} \small + \underbrace{w_3^2 \times \sigma^3_1}_{III} \\ \small + \underbrace{2\times w_1\times w_2\times \sigma_1\times\sigma_2\times Corr_{12}}_{IV} \small + \underbrace{2\times w_1\times w_3\times \sigma_1\times\sigma_3\times Corr_{13}}_{V} \small + \underbrace{2\times w_2\times w_3\times \sigma_2\times\sigma_3\times Corr_{23}}_{VI} \]
\[ \small \underbrace{\small (0.4^2\times 0.3290^2)}_{I} + \underbrace{(0.3^2\times 0.2124^2)}_{II} + \underbrace{(0.3^2\times 0.5861^2)}_{III} \\ \small + \underbrace{(2\times0.4\times0.3\times0.3290\times0.2124\times0.39)}_{IV} + \underbrace{(2\times0.4\times0.3\times0.3290\times 0.5861\times0.16)}_{V} \\ +\small \underbrace{(2\times0.4\times0.3\times0.2124\times 0.5861\times0.14)}_{VI}=26.38\% \]
Definition
The variance of a portfolio \(P\) with \(N\) stocks with weights \(w_{1,2,...,N}\) is:
\[ \sigma^2_p=\sum_{i=1}^{N}w_i^2\sigma_i^2 + 2\times\sum_{i=1}^{N}\sum_{j\neq i} w_i w_j \sigma_{ij} \]
\[ \sigma^2_p = \mathbf{w}'\Sigma\mathbf{w} \]
How much of the variance of a portfolio we can eliminate through diversification?
In practical terms:
Which type of risk is eliminated? Only the idiosyncratic risk! For example, firm-specific characteristics
Which type of risk remains? Only the systematic risk! For example, economic conditions
\(\rightarrow\) For details regarding the mathematics behind risk minimization through diversification, see example for an equally-weighted portfolio in the Appendix
Now that we understand how to calculate the expected return and volatility of a portfolio, we can return to the main goal of the chapter: determine how an investor can create an efficient portfolio
Let’s start of with the simplest case: create a portfolio with two stocks, Amazon and Ferrari. Previously, we’ve shown that, for the analysis period, we had the following results in terms of risk and return:
\(\rightarrow\) In other words: investors should look only for efficient portfolios and will choose based on his specific preferences for risk!
In our example, we used only two assets. What happens when we increase the number of potential assets?
Let’s replicate the same rationale by now investing our money in three possible stocks: Amazon,Ferrari, and VSCO
What happens when you continuously increase the number of assets?
The Efficient Frontier is the set of portfolios where:
Based on this, is there a single portfolio in which all investors should hold? No! In practice, investors will choose among portfolios based on their specific preferences for risk and return
Thus far, we have considered the risk and return possibilities that result from combining risky investments into portfolios
By including all risky investments in the construction of the efficient frontier, we achieve the maximum diversification possible with risky assets
In practice, however, we have the existence of risk-free assets, such as Treasury Bills, Treasury Bonds, Tesouro Direto etc
Up to this point, we assumed that all the available assets had a minimum level of risk - for example, stocks
In what follows, we will investigate what happens when we add the possibility of investing in a risk-free asset
As you’ll see, when you add the risk-free asset, the implication is that there should only be only one efficient portfolio!
\[E[R_{C}] = x \times E[R_p] + (1-x) \times R_f \]
\[ E[R_{C}] = x \times E[R_p] + R_f - x \times R_f\rightarrow R_f + x \times ( E[R_p] - R_f ) \]
\[ E[R_{C}] = R_f + x \times ( E[R_p] - R_f ) \]
What happens to the volatility of a portfolio when you add the possibility of a risk-free asset?
Remember that the risk free rate is assumed to have no risk, and therefore its variance is zero. As a consequence, the standard deviation of your portfolio that contains risky and risk-free assets is:
\[\small \sigma_{R_{C}} = \sqrt{(1-x)^2 \times \sigma^2_{R_f} + x^2 \times \sigma^2_{R_p} + 2 \times(1-x) \times x \times Cov(R_f, R_p)}\]
\[\sigma_{R_{C}} = \sqrt{x^2 \times \sigma^2_{R_p}}\rightarrow x \times \sigma_{R_p}\]
In order to make this point clear, let’s go back to the efficient frontier built on top of the \(>100\) portfolios created using AMZN and RACE
To facilitate the comparison, we’ll convert risk and return to annual terms
If that is true, then the minimum-variance portfolio has:
Suppose you have an risk-free investment opportunity, \(R_f\), that generates a risk-free return of 2%
If that is true, we can think about all linear combinations of \([R_f,R_p]\) in which the returns are a weighted average of \(R_f\) and \(R_p\) and the volatility is only a fraction of \(R_p\)’s volatility
Remember that you can have short positions (“buying stocks on margin”) by:
If that is true, then you will have a negative weight in one asset (a short position) and a positive and >1 weight in the other asset
If, as we’d imagine, \(R_p>R_f\) (i.e, the return of the minimum-variance portfolio is higher than \(R_f\), we could proceed by:
In practice, because your return is a weighted average of \(R_f\) and \(R_p\) and \(R_p>R_f\), the linear combination line “extends” to the right as you are placing a higher weight on the asset with higher return
As before, is there a single portfolio in which all investors should hold? No! In practice, investors will choose among portfolios based on their specific preferences for risk and return
But you may have noticed something strange…the linear combination of \(R_f\) and \(R_p\) yields a sub-optimal portolio:
In other words, we could be better off if we had done a linear combination using a portfolio that yields a better risk \(\times\) return relationship!
How can we find such a portfolio? We need to think about the point where \(\small \partial R_c/\partial\sigma_p\) is the highest - in graphical terms, the portfolio with the highest slope!
\[\text{Sharpe Ratio} = \frac{E[R_p]-R_f}{\sigma_{R_p}}\]
The tangent portfolio is efficient.
Once we include the risk-free investment, all efficient portfolios are combinations of the risk-free investment and the tangent portfolio.
Therefore, all investors should have the tangent portfolio. All investors should combine the tangent portfolio with the risk free asset to adjust the level of risk.
If you ignore the risk free asset, you have several efficient portfolios (efficient frontier). But once you combine with the risk free rate, there is only one!
Suppose you hold a portfolio \(P\). How do you decide whether to include a new asset? In sum, you should include a new asset \(i\) in a portfolio if it increases the Sharpe Ratio of the resulting portfolio! Note that the new asset has the following properties:
Therefore, is the gain in excess return from investing in \(i\) sufficient to make up for the increase in risk? Think about this as your average grade in the university:
\[\underbrace{\frac{E[R_i] - R_f}{\sigma_{R_i} \times corr(R_i,R_p)}}_{\text{Sharpe Ratio of } i} > \underbrace{\frac{E[R_p] - R_f}{\sigma_{R_p}}}_{\text{Sharpe Ratio of } P}\]
\[E[R_i] - R_f >\sigma_{R_i} \times corr(R_i,R_p) \times \frac{E[R_p] - R_f}{\sigma_{R_p}}\]
\[E[R_i] - R_f > \underbrace{\frac{\sigma_{R_i} \times corr(R_i,R_p)}{\sigma_{R_p}}}_{\beta^P_i} \times (E[R_p] - R_f)\]
\[ E[R_i] > R_f + \beta_i^P \times (E[R_p] - R_f) \]
\[ E[R_i] > R_f + \beta_i^P \times (E[R_p] - R_f) \]
\[R_i = R_f + \beta_i^P \times (E[R_p] - R_f)\]
It states that we can determine the appropriate risk premium for an investment based on its \(\beta\) with the efficient portfolio
In such a way, it enables us to “price” the required returns for investing in any asset based on the amount of required returns that are needed to improve the performance of an efficient portfolio
Important
Practice using the following links:
Theorem I: the variance of the sum of two random variables equals the sum of the variances of those random variables, plus two times their covariance:
\[ \small \sigma^2(A+B) = \sigma^2_A + \sigma^2_B + 2\times Cov(A,B) \] Proof: variance is defined as:
\[ \small Var(X)=E[(X-E(X))]^2 \] Therefore, if \(X=A+B\), with \(A\) and \(B\) being two random variables:
\[ \small Var(X)=Var(A+B) = E[((A+B)-E(A+B))]^2 = E[(\underbrace{[A-E(A)]}_{\text{First Term}}+[\underbrace{B-E(B)}_{\text{Second Term}}])^2] \\ \] Which is now in the form \(\small (A+B)^2=A^2+B^2+2AB\). Using the fact that \(E(\cdot)\) is a linear operator, we can apply it to each of the terms:
\[ \small = \underbrace{E([A-E(A)]^2}_{\sigma^2_A}+\underbrace{E[B-E(B)]^2}_{\sigma^2_B}+2\times\underbrace{E[A-E(A)][B-E(B)]}_{Cov(A,B)} = \sigma^2_A + \sigma^2_B + 2\times Cov(A,B)\\ \]
Theorem II: The variance scales upon multiplication with a constant:
\[ \sigma^2(\beta \times A ) = \beta^2\times \sigma^2_A \] Proof: define the variance in terms of \(\beta\) and \(A\):
\[ \sigma^2(\beta\times A)=E[\beta\times A-E(\beta\times A)]^2 \\ \] Since \(\beta\) is a constant, \(E[\beta]=\beta\) and we can write:
\[ E[\beta\times A - \beta\times E(A)]^2= E[\beta\times (A-E[A])]^2=\beta^2\times \underbrace{E(A-E[A])]^2}_{\sigma^2_A} \] Therefore, whenever there is a scale constant multiplying a random variable, it scales the variance: \(\beta^2 \times\sigma^2_A\)
\[ \small Var(R_p) = \bigg(N\times\dfrac{1}{N^2}\times \overline{Var}\bigg)+ \bigg[(N^2-N)\dfrac{1}{N^2}\times \overline{Cov}\bigg]\\ \small = \bigg(\frac{1}{N} \times \overline{Var}\bigg) + \bigg[\bigg(1-\frac{1}{N}\bigg) \times \overline{Cov}\bigg] \]
\[ \small \underset{N\rightarrow\infty}{\small Var(R_p)} = \bigg(\frac{1}{\infty} \times \overline{Var}\bigg) + \bigg[\bigg(1-\frac{1}{\infty}\bigg) \times \overline{Cov}\bigg]\rightarrow \overline{Cov} \]
\[\small \sigma^2_{R_p} = \sum_i w_i \times Cov(R_i,R_p)\]
The variance of a portfolio approaches the weighted average covariance of each stock with the portfolio!
Because \(\small Cov(R_i,R_P) = \sigma_i \times \sigma_p \times Corr_{i,p}\) you can also write it as:
\[\sigma^2_{R_p} = \sum_i x_i \times \sigma_{i} \times \sigma_{p} \times Corr_{i,p}\]
\[\sigma_{p} = \sum_i x_i \times \sigma_{i} \times Corr(R_i,R_p)\]
Why this equation is important?
It shows the amount of risk that each security brings to portfolio
Each asset \(i\) contributes to the portfolio’s volatility according to its standard deviation (\(\sigma_i\)) scaled by its correlation with the portfolio